約 4,396,205 件
https://w.atwiki.jp/osinko/pages/20.html
enumオブジェクト <定義側> public enum CObjectStatus { Inactive, Active, Dying, Immune //準備状態、アクティブ、死亡状態、無敵状態 } <実装側> CObjectStatus test = CObjectStatus.Active; 主に状態(ステータス)を表す時に便利。こんなものでも型をあわせなければならないことに注意。 入れ子になったクラス関係 <定義側> public class Class1 { int val; string str = "Class1Field_"; public NodeClass node; //ここをpublicにすれば外部から操れるし、privateにすればブラックボックスに出来る public Class1() { val = 1234; node = new NodeClass(val,str); //フィールドで実装は出来ないのでコンストラクタで行う。nodeにNodeClassを実装すればpublicで外部からインスタンスにアクセス可能となる } public class NodeClass //これが入れ子になった内部クラス { string strVal; public NodeClass(int val,string str) { strVal = str+"Construct val="+val; } public void Method() { Console.WriteLine(strVal); } } } <実装側> Class1 class1 = new Class1(); class1.node.Method(); <出力> Class1Field_Construct val=1234 入れ子を有効に利用すると機能を実装する構造を内部に隠蔽し外部からアクセスする部分だけ公開することが容易に出来る 自作クラスライブラリを製作する際、基本的な考え方になる(非常に基礎的な確認の為ここに載せている) 継承とoverrideの特徴 ソース <定義側> public abstract class Class1 { private string retVal; public string RetVal { get { return this.retVal; } set { this.retVal=value;} } protected Class1() { RetVal = "Class1Construct "; } public virtual void update() { RetVal += "Class1Update"; } public virtual void draw() { Console.WriteLine("Class1_Draw {0}", RetVal); } } public class Class2 Class1 { public Class2() { RetVal = "Class2Construct "; } public override void update() { base.update(); RetVal += " + Class2Update"; } public override void draw() { Console.WriteLine("Class2_Draw {0}", RetVal); } } public class Class3 Class2 { public Class3() { RetVal = "Class3Construct "; } public override void update() { base.update(); RetVal += " + Class3Update"; } public override void draw() { Console.WriteLine("Class3_Draw {0}", RetVal); } public void Method() { RetVal += " + Class3Method"; } } <実装側> Class1 SetClass = new Class3(); ((Class1)SetClass).update(); ((Class1)SetClass).draw(); //インスタンスはClass3で作成している //型をClass1にキャストして関数実行してもオーバーライドされているのでClass3のupdate()が実行される //基底クラスの関数は上書きされる訳ではなく残っているので関数内のbase.update()で基底クラスの関数が実行できる ((Class3)SetClass).Method(); SetClass.draw(); //Class3にキャストしてメソッドを呼んでいる SetClass = new Class2(); SetClass.update(); SetClass.draw(); //こちらはClass2でインスタンスを作った場合 //もちろんClass3のMethod()は呼べない <出力結果> Class3_Draw Class3Construct Class1Update + Class2Update + Class3Update Class3_Draw Class3Construct Class1Update + Class2Update + Class3Update + Class3Method Class2_Draw Class2Construct Class1Update + Class2Update この仕組みを理解するに、あまり深い継承関係を築くとデバッグも大変そうだというのが分かる 些細なバグが発生し究明が基底クラスの深いクラスになってくると全ての構造を理解しないと原因が分からなくなりそうである 深い継承関係を作る際は注意 static readonlyの利用 <定義側> namespace shooterGame { /// summary /// ゲームにおける定数値を格納したクラス /// /summary public class GameCenter { public static readonly float PixelsPerSecond = 200; //自機のスピード public static readonly float RespawnTime = 5.0f; //プレーヤー無敵時間 public static readonly int bulletMax = 20; public static readonly int rateOfFire = 4; public static readonly int ShipControlSideSafeArea = 50; //左右の移動制限ピクセル数 } } <実装側> else if(status== ObjectStatus.Immune) //無敵の時間切れ処理 { if (totalGameSeconds deathTimeTotalSeconds + (GameCenter.RespawnTime * 2)) { status = ObjectStatus.Active; } 上記の例のように定義側で変数をstaticにすることによってクラス名から値を直接呼ぶことが可能となる 内部では変数として扱われるのでconstのように定数として扱われないが分割コンパイルはしやすい 抽象クラスの利用(abstract) <定義側> public abstract class Person //抽象クラスなのでインスタンスを直接作れない { public virtual string Method() //しかしメンバ関数の中身は作れる { return "Personメソッド"; } } public class Taro Person //継承したのでこれでインスタンスを作成可。抽象クラス内のメンバ関数も利用できる { } public class Sato Person //関数を上書き出来る { public override string Method() { return "サトー"; } } <実装側> List Person test = new List Person (); //ここでは「型」としてPersonを利用している。型としてなら抽象クラスでも利用できる点に注意 //Person person = new Person(); //抽象クラスのインスタンスは作成できない Taro taro = new Taro(); //抽象クラスを継承しているのでインスタンスを作成できる Sato sato = new Sato(); test.Add(taro); test.Add(sato); foreach (Person val in test) Console.WriteLine(val.Method());
https://w.atwiki.jp/asagaolabo/pages/5716.html
[Head Scratcher] 【ヘッドスクラッチャー】 [Swinging Skulls] ハイライト発生箇所 収録作品 ロング版収録 関連リンク ポップンミュージック UniLabで登場した楽曲。 担当キャラクターはアルフォンス・ミシェル(CS11-1PUni)。 覚醒のエルムで獲得できるイベント隠し曲で、サウンドトラック「pop n music 解明リドルズ Original Soundtrack」でBrand New Tracksとして収録された曲。 Head Scratcher / ヨナヲスナヲ×北川翔也 BPM 15x ? 新難易度 EASY NORMAL HYPER EXTRA xx xx xx xx ハイライト EASY NORMAL HYPER EXTRA 3 3 3 3 (楽曲解説は後日予定) ハイライト発生箇所 番号 5Buttons / EASY NORMAL HYPER EXTRA 1 2 3 収録作品 AC版 ポップンミュージック UniLabからの全作品 覚醒のエルムで2024/02/01から出現できる曲として登場。 CS版 ロング版収録 (現時点で無し) 関連リンク 覚醒のエルム 楽曲一覧/ポップンミュージック UniLab
https://w.atwiki.jp/thunderstone/pages/244.html
Dryad/ドライアド カードタイプ:Monster/モンスター エキスパンション:Heart of Doom/最後の血戦 英語版 Card Name Number Class Health Gold XP VP Text SWAMP WILLOW 3 DRYAD 4 3 1 1 When this Monster enters the Hall, draw another card from the Dungeon Deck and place it at the end as an additional rank. When this card leaves the Hall, do not replace it.Trophy Light+1 ROOTBINDER 2 7 2 1 2 When this Monster enters the Hall, draw another card from the Dungeon Deck and place it at the end as an additional rank. When this card leaves the Hall, do not replace it.Trophy Light+1 SNAG HAG 2 10 2 2 5 When this Monster enters the Hall, draw another card from the Dungeon Deck and place it at the end as an additional rank. When this card leaves the Hall, do not replace it.Trophy Light+1 TREE HERDER 2 13 1 2 6 When this Monster enters the Hall, draw another card from the Dungeon Deck and place it at the end as an additional rank. When this card leaves the Hall, do not replace it.Trophy Light+1 THE OLD ONE 1 16 1 3 8 When this Monster enters the Hall, draw another card from the Dungeon Deck and place it at the end as an additional rank. When this card leaves the Hall, do not replace it.Trophy Light+1 日本語版 カード名 枚数 分類 ヘルス 金貨値 経験値 勝利点 テキスト 沼ヤナギ 3 ドライアド 4 3 1 1 このモンスターがホールに登場したら、ダンジョンデックからもう1枚引いてホールの最後に加え、追加ランクを作る。このカードがホールを去っても補充は行わない。トロフィー:明かり+1 巻きつく根 2 7 2 1 2 このモンスターがホールに登場したら、ダンジョンデックからもう1枚引いてホールの最後に加え、追加ランクを作る。このカードがホールを去っても補充は行わない。トロフィー:明かり+1 とげ婆 2 10 2 2 5 このモンスターがホールに登場したら、ダンジョンデックからもう1枚引いてホールの最後に加え、追加ランクを作る。このカードがホールを去っても補充は行わない。トロフィー:明かり+1 木の番人 2 13 1 2 6 このモンスターがホールに登場したら、ダンジョンデックからもう1枚引いてホールの最後に加え、追加ランクを作る。このカードがホールを去っても補充は行わない。トロフィー:明かり+1 古きもの 1 16 1 3 8 このモンスターがホールに登場したら、ダンジョンデックからもう1枚引いてホールの最後に加え、追加ランクを作る。このカードがホールを去っても補充は行わない。トロフィー:明かり+1 カード解説/CARD GLOSSARY エラッタ カード分析 平均ヘルス/金貨値/経験値/勝利点 = 8.8/2.0/1.6/3.7 所感 樹木の精霊。通常、人間の女性に近い姿として描かれることが多いが、サンダーストーンでは完全に樹木そのものである。他のファンタジー作品で言うところのエントやトレントに近い外見になっている。 テキスト欄に書いてあることが全員一言一句同じという珍しいモンスタークラス。Horde・Humanoid/ホード・ヒューマノイドやThe Swarm・Animal/スウォーム・アニマルを除けばこの種族くらいである。また、上位種になるごとにヘルスが+3ずつ増えていく。微妙にデザインの手抜き感がなくもない。 特徴は高いヘルスと追加のランクを生成する能力。 Swamp Willow以外がどれも高いヘルスを持つ。ヘルス10以上が半数を占めるという凄まじさである。戦闘では何の能力も持っていないので火力さえ高めれば問題なく狩れるのだが、ここまで硬いとそれでもかなり苦労する。 Dryad自身はヘルスが高いこと以外には戦闘での特徴を持たない。小突けば普通にダンジョンの奥に帰っていく。 Swamp Willowのみ、ヘルス4と大変柔らかい。勝利点や経験点は全く美味くないものの、金貨値3とトロフィーの明かり+1は魅力。同ヘルス域のモンスターの中では抜きん出ている。ドライアドと戦うのに明かりは重要な要素になるので、積極的に狩って行こう。 追加ランクの生成はこのモンスタークラスにしかない特殊能力。ダンジョンホールに現れた際にランク4を生成し、そこに新たなモンスターをダンジョンデックから補充する。この状態で更にドライアドが現れた場合、ランク5、ランク6・・・と次々に深いランクを生成していく。ドライアドがホールを離れた時はホールの補充を行わないので、増えていたランクの数が元に戻る。 ホールに存在するモンスターの数が増えるので狩りの選択肢も増える。もちろん、ランク4以上では明かりペナルティーも大きく、容易く狩れるものではないので明かりの確保が重要となるだろう。 ダンジョンの進行の感覚が普段と異なる。中盤だと思ってたのにサンダーストーンが出てきた、などということも。 全体効果のあるモンスターと組み合わさると大きな脅威になる。 関連カード 狩りやすいカード 明かりペナルティ無視を持つBlind/ブラインドとJondulのLV3、深いランクでの戦闘であるほど攻撃力を増すThornwood/ソーンウッドやNyth、ランクを自在に入れ替えるBanish/バニッシュなどがあれば深いランクを効率的に狙うことが可能になる。 苦手とするカード Thunderstone Advance対応版 ・レベル表記追加:LV3
https://w.atwiki.jp/nunnun/pages/21.html
Name Watchaman MainArm Sniper SubArm Rifle Mouse Intelli Mouse Optical スナイパーもアサルターもできる、オールラウンダー。
https://w.atwiki.jp/legendofnorrath/pages/242.html
SS Title Fortune Type Ability Faction - Attribute - Archetype Priest Cost 4 Level 2 Attack - Defense 2 Bonus - Health - Game Text When you play this ability, draw 2 cards. このAbilityをPlayしたとき、Cardを2枚Drawする。 Card Number 1C134(Common,Oathbound) Lore O er shining hills and rolling seas, frozen peaks and trackless moors, I follow where Fortune leads my heart, which is my home at journey s end. --Song of the Wanderer
https://w.atwiki.jp/legendofnorrath/pages/255.html
SS Title Word Of Vigor Type Ability Faction - Attribute - Archetype Priest Cost 5 Level 1 Attack - Defense 3 Bonus - Health - Game Text At the start of your turn, if this ability is ready, draw a card. 自分のターン開始時、このAbilityがReady状態のままであった場合、Cardを1枚Drawする。 Card Number 1R147(Rare,Oathbound) Lore Inner strength comes as much from the will of the heart as from the words of the mighty.
https://w.atwiki.jp/okamemo/pages/22.html
課題 誤差付きのプロット(165行目附近)。ただガウシアンのフィッティングによる誤差がかなり小さいのであまり関係ないかもeyていうのはADC Channelの誤差なので実はこの場合だとx軸の誤差 ガウシアン+線形項によるフィッティング #include fstream #include TH1.h #include TH2.h #include TFile.h #include TTree.h #include TCanvas.h #include parameter.h #include math.h //#include iostream #include iostream using namespace std; //ここまでで使うライブラリをincludeしてます.parameter.hというのは自分でつくってヘッダファイルで,キャリブレーション用のパラメターが書いてあります. void macro_calb_oka(){ //Last modified 2011/11/22 char filename[99];//root file name // sprintf(filname,"22na20111104.001.root"); //sprintf(filename,"22na-10.03.001-002.root"); //spintf(filename,"22na-11.10.20-21.root"); sprintf(filename,"22na-20111028.002.root"); // sprintf(filename,"22na20111104.001.root"); // sprintf(filename,"22na-20111111.001.root"); // sprintf(filename,"22na-20111118.001.root"); // sprintf(filename,"22na-20111201.001.root"); //filenameという変数を宣言して,そこにファイル名を代入してます.この変数はファイルを開くのと,あとでPDFファイルをつくるときに使います.sprintfはprintfと似た関数で,変数に文字列をいれることができます.ROOTのマクロを書くときにはけっこう便利です.あと、文字列をいれるときは,charというクラスでその文字数以上の配列として宣言するみたいです。 TFile *f1=new TFile(filename);//opening root file//ファイルを開いています。 Double_t p[9][9][9];//pというDouble_t クラスの配列は、フィッティングのときに使うパラメターです。p[i][j][k]はチャネルiのj番目のピークのk番目のパラメターを意味しています。j=1は511keVのピーク、j=2は1275のピーク、j=3はサムピークです。k=0はガウシアン全体にかかる定数(使わない)k=1はMean,k=2はSigmaです。 Double_t ey[3]; TH1F *h[99]; h[1]=h101; h[2]=h102; h[3]=h103; h[4]=h104; h[5]=h105; h[6]=h106;//TH1Fは1次のFloatのHistgramのクラスです。ROOTファイルに入っているh101~h106までのヒストグラムをプログラム中で扱いやすいようにh[i]という配列を宣言して、そこに代入しています。 // end of front matter // gStyle- SetOptFit(0001); gStyle- SetOptFit(0000);//ここはフィッティングのパラメータをどのようにキャンバスに出力するか決めています TCanvas *c1 = new TCanvas("c1","Raw Data and Fitting"); c1- Divide(2,3); TCanvas *c2 = new TCanvas("c2","Enegy Calibration"); c2- Divide(2,3); TCanvas *c3 = new TCanvas("c3","Calibrated Hist"); c3- Divide(2,3); //TCanvasというクラスはヒストグラムとかを出力するためのクラスです.キャンバスをDivideするとキャンバスを複数に分けることができます for(Int_t ch=1;ch =6;ch++){ /* char hclone[256]; sprintf(hclone,"hclone%d",ch); hoge = h[ch]- Clone(hclone); h[ch+10]=hoge; //h101〜h106を違う目的で使いたいので複製しています*/ c1- cd(ch)- SetLogy(); h[ch]- Draw();//まず,キャンバスc1の6つに分割したうちの1番目に移動し,ch=1のときはh[1]=h101をDrawします. //Preparation of Fitting function//ここからはピークをフィッティングするための関数を準備しています. TF1 *fit1; char fname[256]; char mean1[256],mean2[256],mean3[256]; char resol1[256],resol2[256],resol3[256]; sprintf(fname,"f[%d]",ch);//fnameは関数の名前で,ひとつめのピークにはチャネルごとにf[1]?f[6]をフィッティングします fit1 = new TF1(fname,"gaus",p1start[ch],p1end[ch]);//この行ではフィッティングのための関数fit1をつくっています.名前はfnameに入っている値,種類はガウシアン,定義域はp1startとp1endに入っている値です h[ch]- Fit(fit1,"","",p1start[ch],p1end[ch]); //h[ch]にfit1をフィッティングします fit1- GetParameters(p[ch][1]); //フィットしたfit1について,そのフィッティングパラメータを得ます.これによってp[ch][1][1]にはMeanが,p[ch][1][2]にはSigmaが入ります. ey[0] = fit1- GetParError(1); sprintf(mean1," Mean =%lf",p[ch][1][1]); sprintf(resol1,"Resol.=%lf",2*sqrt(2*log(2.0))*p[ch][1][2]/p[ch][1][1]);//凡例に表示するための文字列を準備しています //同じことを2つ目,3つ目のピークについても行います. TF1 *fit2; sprintf(fname,"f[1%d]",ch); fit2 = new TF1(fname,"gaus",p2start[ch],p2end[ch]); h[ch]- Fit(fit2,"","",p2start[ch],p2end[ch]); fit2- GetParameters(p[ch][2]); ey[1] = fit2- GetParError(1); sprintf(mean2," Mean =%lf",p[ch][2][1]); sprintf(resol2,"Resol.=%lf",2*sqrt(2*log(2.0))*p[ch][2][2]/p[ch][2][1]); TF1 *fit3; sprintf(fname,"f[10%d]",ch); fit3 = new TF1(fname,"gaus",p3start[ch],p3end[ch]); h[ch]- Fit(fname,"","",p3start[ch],p3end[ch]); fit3- GetParameters(p[ch][3]); ey[2] = fit3- GetParError(1); sprintf(mean3," Mean =%lf",p[ch][3][1]); sprintf(resol3,"Resol.=%lf",2*sqrt(2*log(2.0))*p[ch][3][2]/p[ch][3][1]); h[ch]- Draw();//もう1回Drawします.なぜかこうしないとうまくいかなかったきがする fit1- Draw("sames");//fit1をDrawします."sames"と書くと上書きされます. fit2- SetLineColor(3); fit2- Draw("sames");//fit2の線の色を設定したのち,上書きします fit3- SetLineColor(7); fit3- Draw("sames"); //ここからは凡例(Legend)の設定です TLegend *l = new TLegend(0.6255,0.75,0.875,0.45);//TLegendクラスの変数 l を宣言しました l- AddEntry(fit1,"511 keV","lp"); //lにfit1を追加し,その表示名を511 keVとしました l- AddEntry((TObject*)0, mean1,"");//文字列mean1をlに追加しました l- AddEntry((TObject*)0, resol1,""); l- AddEntry(fit2,"1274 keV","lp"); l- AddEntry((TObject*)0, mean2,""); l- AddEntry((TObject*)0, resol2,""); l- AddEntry(fit3,"511+1274 keV","lp"); l- AddEntry((TObject*)0, mean3,""); l- AddEntry((TObject*)0, resol3,""); l- SetFillColor(0);// l の背景を白にします l- Draw();//lをキャンバスに描きます // Graph of calibration //エネルギーキャリブレーションの式を求めるグラフをつくります c2- cd(ch); //xとyの散布図をつくるために,値を準備しておきます Double_t x[3],y[3]; y[0]=511; y[1]=1274; y[2]=511+1274; x[0]=p[ch][1][1]; x[1]=p[ch][2][1]; x[2]=p[ch][3][1]; // TGraph *g=new TGraphErrors(3,x,y,ey,0);//gをxとyの散布図として宣言してつくります TGraph *g=new TGraph(3,x,y);//gをxとyの散布図として宣言してつくります char gtitle[256]; sprintf(gtitle, "Calibration for ADC%d",ch);//グラフのタイトルを準備します g- SetTitle(gtitle);//グラフのタイトルをgtitleに入っている値にしました g- SetMarkerStyle(5);//グラフのデータ点の設定 g- SetMarkerSize(1);//データ点の大きさ g- SetMarkerColor(1);//データ点の色 g- GetXaxis()- SetTitle("ADC Channel");//x軸の名前 g- GetYaxis()- SetTitle("Energy (keV)"); g- Draw("AP");//グラフをDrawします.APってオプションはなんだか忘れました char fgname[256]; sprintf(fgname,"fg[%d]",ch); TF1 *fg = new TF1(fgname,"pol1",0,4000); g- Fit(fg,"","",0,4000); //つくったグラフに対して1次元の1次関数fgをfitします char func[256]; Double_t pcal[9][2]; fg- GetParameters(pcal[ch]); sprintf(func,"y=%lfx+%lf",pcal[ch][1],pcal[ch][0]);//fitしたfgに対してパラメータを取得し,funcという文字列に式を書いておきます TLegend *lg = new TLegend(0.5255,0.40,0.875,0.15); lg- AddEntry(g,"Data Point","p"); lg- AddEntry(fg,"Fitted line","l"); lg- AddEntry((TObject*)0, func, ""); lg- SetFillColor(0); lg- Draw();//canvas2にもlgというlegendをつくりました. //次にヒストグラムの軸をkeVで書き直したものをつくります c3- cd(ch)- SetLogy(); //hstartとhendは最後に横軸をkeVで書き換えたあと、各チャンネルのプロットする範囲を決める変数です。 double hstart, hend; hstart=pcal[ch][1]*0+pcal[ch][0]; hend=pcal[ch][1]*4000.0+pcal[ch][0]; /* h[ch+10]- SetBins(4000,hstart,hend); h[ch+10]- Draw();*///x軸を書き直す作業はこれだけで終わりです //あとはさっきと同じことをしてる //Gaussian Resolution=FWHM/Mean //FWHM=2*Sigma*sqrt(2*log2) // 分解能出すときにcalibrationの後もう一度フィッティングしてからのほうがいいのかも sprintf(mean1," Mean =%lf keV",pcal[ch][1]*p[ch][1][1]+pcal[ch][0]); sprintf(resol1,"Resol.=%lf",2*sqrt(2*log(2.0))*(pcal[ch][1]*p[ch][1][2])/(pcal[ch][1]*p[ch][1][1]+pcal[ch][0])); sprintf(mean2," Mean =%lf keV",pcal[ch][1]*p[ch][2][1]+pcal[ch][0]); sprintf(resol2,"Resol.=%lf",2*sqrt(2*log(2.0))*(pcal[ch][1]*p[ch][2][2])/(pcal[ch][1]*p[ch][2][1]+pcal[ch][0])); sprintf(mean3," Mean =%lf keV",pcal[ch][1]*p[ch][3][1]+pcal[ch][0]); sprintf(resol3,"Resol.=%lf",2*sqrt(2*log(2.0))*(pcal[ch][1]*p[ch][3][2])/(pcal[ch][1]*p[ch][3][1]+pcal[ch][0])); TLegend *lc = new TLegend(0.6255,0.75,0.875,0.45); // lc- AddEntry(fit1,"511 keV","lp"); lc- AddEntry((TObject*)0, mean1,""); lc- AddEntry((TObject*)0, resol1,""); // lc- AddEntry(fit2,"1274 keV","lp"); lc- AddEntry((TObject*)0, mean2,""); lc- AddEntry((TObject*)0, resol2,""); // lc- AddEntry(fit3,"511+1274 keV","lp"); lc- AddEntry((TObject*)0, mean3,""); lc- AddEntry((TObject*)0, resol3,""); lc- SetFillColor(0); lc- Draw(); } //こっからは新機能 //1次式+ガウシアンでフィットし直す char fglname[99]; TF1 fgl[7][4];//function gauss + linear [ch No.][peak No.] TCanvas *c4 = new TCanvas("c4","Fitting with Gaussian and Linear function"); c4- Divide(2,3); Double_t paratest[7][5]; for (Int_t ch=1; ch 7; ch++){ c4- cd(ch)- SetLogy(); h[ch]- Draw(); sprintf(fglname,"fgl1%d",ch); fgl[ch][1] = new TF1(fglname,"[0]/sqrt(2.0*3.14)/[1]*exp(-(x-[2])*(x-[2])/2.0/[1]/[1])+[3]*x+[4]");//[0] constant ,[1] sigma, [2] mean fgl[ch][1]- SetParameters(p[ch][1][0],p[ch][1][2],p[ch][1][1],0,0);//パラメータの初期値の設定 h[ch]- Fit(fglname,"","",p1start[ch],p1end[ch]); fgl[ch][1]- GetParameters(paratest[ch]);// parameterをgetしてこれを使えば直線の式が出せるはずだがなんかできない //ftest= new TF1("ftest","[0]*x+[1]",p1start[ch],p1end[ch]); TF1 *ftest = new TF1("ftest","[0]*x+[1]"); ftest- SetParameter(0,paratest[ch][3]); ftest- SetParameter(1,paratest[ch][4]); ftest- SetLineColor(7); fgl[ch][1]- Draw("sames"); ftest- Draw("sames"); /* //2番目3番目のピークを重ね書きするのはまだできてない sprintf(fglname,"fgl2%d",ch); fgl[ch][2] = new TF1(fglname,"[0]/sqrt(2.0*3.14)/[1]*exp(-(x-[2])*(x-[2])/2.0/[1]/[1])+[3]*x+[4]");//[0] constant ,[1] sigma, [2] mean fgl[ch][2]- SetParameters(p[ch][2][0],p[ch][2][2],p[ch][2][1],0,0); h[ch]- Fit(fglname,"","",p2start[ch],p2end[ch]); fgl[ch][2]- Draw("sames"); sprintf(fglname,"fgl3%d",ch); fgl[ch][3] = new TF1(fglname,"[0]/sqrt(2.0*3.14)/[1]*exp(-(x-[2])*(x-[2])/2.0/[1]/[1])+[3]*x+[4]");//[0] constant ,[1] sigma, [2] mean fgl[ch][3]- SetParameters(p[ch][3][0],p[ch][3][2],p[ch][3][1],0,0); h[ch]- Fit(fglname,"","",p3start[ch],p3end[ch]); fgl[ch][3]- Draw("sames"); */ } //キャンバスをPDFに出力します //Print char pdfstart[99]; sprintf(pdfstart,"%s.pdf(",filename); char pdfmiddle[99]; sprintf(pdfmiddle,"%s.pdf",filename); char pdfend[99]; sprintf(pdfend,"%s.pdf)",filename); c1- Print(pdfstart); c2- Print(pdfmiddle); c3- Print(pdfmiddle); c4- Print(pdfend); //この下では別のプログラムで使うためのヘッダファイルをつくっています.あんまりきにしなくてもいいはず //フィッティングパラメーターをファイルに書きこむ char pfile[99]; sprintf(pfile,"parameter%s.h",filename); FILE *fp; fp=fopen(pfile,"w"); fprintf(fp,"Double_t para1[7], para2[7],para3[7],para4[7];\nDouble_t para12,para13,para14,para15,para16, para23,para24,para25,para26,para34,para35,para36,para45,para46,para56;\n\n"); fprintf(fp,"//Energy = Naiadc[ch]*para1[ch]+para2[ch]\n"); //Writing ADC Parameters char para1[99]; char para2[99]; for(Int_t ch=1; ch 7; ch++){ sprintf(para1,"para1[%d]=%lf;\n",ch,pcal[ch-1][3]); fprintf(fp,para1); sprintf(para2,"para2[%d]=%lf;\n",ch,pcal[ch-1][2]); fprintf(fp,para2); } //Writing TDC Parameters fprintf(fp,"para3[1]=0.5707;\npara4[1]=42.063;\npara3[2]=0.5679;\npara4[2]=47.576;\npara3[3]=0.5361;\npara4[3]=67.592;\npara3[4]=0.6024;\npara4[4]=12.809;\npara3[5]=0.5663;\npara4[5]=50.119;\npara3[6]=0.56559;\npara4[6]=45.407;\n\n"); fprintf(fp,"para12=0;\npara13=0;\npara14=0;\npara15=0;\npara16=0;\npara23=0;\npara24=0;\npara25=0;\npara26=0;\npara34=0;\npara35=0;\npara36=0;\npara45=0;\npara46=0;\npara56=0;\n"); fclose(fp); }
https://w.atwiki.jp/news4xna/pages/75.html
The XNA Framework Game class provides a framework for processing game simulation based on a fixed or variable time interval. This overview covers the following topics. Making a New Game Game Loop Timing Starting the Game Game Components Game Services Game Components Consuming Game Services Making a New Game The first step in creating a new game is to make a class that derives from Game. The new class needs to override Update, Draw, and Initialize. The Update method is responsible for handling game logic, and the Draw method is responsible for drawing each frame. The Initialize method is responsible for game setup before the first frame of the game. Game Loop Timing A Game is either fixed step or variable step, defaulting to fixed step. The type of step determines how often Update will be called and affects how you need to represent time-based procedures such as movement and animation. ・A variable-step Game calls its Update method as soon as the previous frame is done drawing. Setting Game.IsFixedTimeStep to false causes a Game to use a variable-step game loop. This type of Game requires the game logic and animation code to be based on elapsed time to ensure smooth gameplay. Because the Update method is called immediately after the previous frame, the time between calls to Update can vary. Without taking the time between calls into account, the game would seem to speed up and slow down. The time elapsed between calls to the Update method is available in the Update method s gameTime parameter. When using a variable-step game loop, you should express rates—such as the distance a sprite moves—in game units per ms. The amount a sprite moves in any given update can then be calculated as the rate of the sprite times the elapsed time. Using this approach to calculate the distance the sprite moved ensures that the sprite will move consistently if the speed of the game or computer varies. ・A fixed-step Game tries to call its Update method on the fixed interval specified in TargetElapsedTime. Setting Game.IsFixedTimeStep to true causes a Game to use a fixed-step game loop. Using a fixed step allows game logic to use the update as its basic unit of time and assume that Update will be called at the interval specified. When an update runs slower than expected, Game meets this assumption by calling Update extra times and dropping the frames associated with those updates to catch up. This ensures that Update will have been called the expected number of times when the game loop catches up from a slow down. When using a fixed-step game loop, rates such as the distance a sprite moves can be expressed as game units per Update. This enables you to simply increment the position of the sprite by the sprite s movement rate each Update. Starting the Game Calling the Game.Run method starts a game. This method starts a loop that will call Update and Draw multiple times a second until Exit is called. Game Components Game components provide a modular way of adding functionality to a game. You create a game component by deriving it from the GameComponent or DrawableGameComponent classes. You then add game logic and rendering code to the game component by overriding GameComponent.Update,DrawableGameComponent.Draw and GameComponent.Initialize. A game component is registered with a game by passing the component to Game.Components.Add. A registered component will have its draw, update and initialize methods called from the Game.Initialize, Game.Update and Game.Draw methods. Game Services A game service is functionality provided by an object that is available to any thing with a reference to the Game object. Game services allow a reference to be obtained to an object implementing a particular interface without knowing the actual name or identity of the object. A class specifies the services it provides by implementing interfaces and registering the services with Game.Services. A service is registered by calling Game.Services.AddService specifying the type of service being implemented and a reference to object providing the service. For example to register an object that provides a service represented by the interface IMyService the following code would be used. Services.AddService(typeof(IMyService), myobject); Once a service is registered the object providing the service can be retrieved by Game.Services.GetService and specifying the desired service. For example if the IGraphicsDeviceService is needed the following code would be used to retrieve it. IGraphicsDeviceService graphicsservice = (IGraphicsDeviceService)Services.GetService(typeof(IGraphicsDeviceService)); Game Components Consuming Game Services The GameComponent class provides the Game property so a GameComponent can determine what Game it is attached to. With the Game property a GameComponent can call Game.Services.GetService to find a provider of a particular service. For example a GameComponent would find the IGraphicsDeviceService provider with the following code. IGraphicsDeviceService graphicsservice = (IGraphicsDeviceService)Game.Services.GetService(typeof(IGraphicsDeviceService));
https://w.atwiki.jp/c_e_p/pages/34.html
Matches Wins Losses Draws PCT 1 0 0 1 - Date Clan Map Result Members 2007.12.31 SOS obj_northport T 1-4/SO 3-2 (4-6) 冷 髄 蛸 黄 飛 obj_railhouse T 3-2/SO 3-2 (6-4) 冷 髄 蛸 黄 飛 10-10 Draw
https://w.atwiki.jp/paintgame/pages/21.html
◆ DRAWS-◎-TROIDAL 相手 場 A B C D E 自分 両プレイヤーのライフを50とし、デッキ枚数を60とする。 先に相手プレイヤーのライフを0にしたプレイヤーが勝利となる。また別の条件として、相手がデッキ枚数0でカードを引けなくなった場合でも勝利となる。 両プレイヤーはゲームの始めにデッキの上から5枚のカードをめくり、横並びに5つある自分のフィールドにそれぞれ好きな順番でセットする。 (セットの際はセットされたカードの情報は相手にはパワーしか見えない。) またこの時、めくった5枚のカードが気に入らなければ、1度だけそれらをデッキに戻してシャッフルし、新たに5枚をめくってセットしても良い。 その後デッキからカードを5枚手札に加え、ランダムで一人のプレイヤーにイニシアチブ(優先権)が置かれ、ゲームスタート。 ⓪◆ スタンバイ ◆ ターンを開始。 ①◆ ドロー ◆ 両プレイヤーは、自身の手札が5枚になるようにデッキからカードを引く。 (デッキが0の状態でカードが引けなくなった場合、そのプレイヤーは敗北となる。) ②◆ フィールドセット ◆ 自分のフィールドに空きがある場合、手札からカードをセットし、空きを全て埋める。 (この時にセットされたカードの情報も相手にはパワーしか見えない。ただし、セット前に既にフィールドにあったカードの情報は、相手側も全て確認できる)。 ③◆ フィールドシャッフル ◆ 両プレイヤーは、自身のバトルフィールドのカードの並びを2回まで入れ替えてよい。 ただし、入れ替えは左右に隣接した2枚のカード同士のみ可能である。入れ替えは1度も行わなくとも良い。 ④◆ フィールドオープン ◆ 全てのバトルフィールド上のカードとその情報を相手にも開示する。 この時に発動するカードがあれば、Aから順番に、イニシアチブが置かれたプレイヤーのカードを優先して発動してゆく。 ⑤◆ フィールドバトル ◆ フィールドのカードはそれぞれ、向かい合った相手のカードとバトルする。 バトルはAから順番に処理されてゆく。 またバトル時に発動するカードもAから順番に、イニシアチブが置かれたプレイヤーのカードを優先して発動してゆく。 バトルするカードが属性で勝っていればその時点で有利属性のカードが勝利となる(例外あり)。 そうでない場合はカードのパワー数値が高い方が勝利となる。 属性による勝利がなく、両カードともパワーが同じの場合は両カードとも敗北となる。 敗北したカードのプレイヤーは、敗北した自分のカードに書かれているリスクの値だけ、自分のライフが減少する(敗北ダメージ)。 敗北したカードはその時点ですぐに持ち主のトラッシュ(捨て札置き場)に置かれるが、敗北カードにガードポイント(防御力)が残っている場合、ガードポイントが1減少するだけで済み、敗北ダメージも発生しない。 また、5回連続で勝利したカードは強制的にトラッシュに置かれる。 ⑥◆ エンド ◆ イニシアチブを相手プレイヤーに移し置き、?番に戻る。 ◆補足 ◎デッキ DRAWS-◎-TROIDALのデッキは60枚のカードで一組としたカードの束を指します。 ターンのはじめにはデッキから手札にカードが補充され、プレイヤーはその手札のカードを用いてゲームをプレイします。 デッキ枚数が足りず、カードが引けなくなった場合はその時点でそのプレイヤーの敗北となります。 ◎ドロー デッキの一番上からカードを手札に加える行為を指します。 ターンのはじめの手札の補充や、カードの特殊効果による手札の補充がこれにあたります。 なお、デッキを見てその中からカードを選び手札に加える行為はドローとは呼びません。 ◎手札 フィールドセット時は、自分の空きフィールドに手札からカードをセットします。 手札の枚数は基本的に5枚のみですが、カードの効果などにより一時的に5枚を上回る場合があります。 5枚を超えても、手札を5枚にしなければならないなどのペナルティはありません。 ◎ライフ 名の通り、プレイヤーの命です。ライフが0になったプレイヤーは敗北します。 プレイヤーのライフはスタート時に50ありますが、この値は上限ではありません。 カードの効果によってライフの回復などが発生した場合、50を超える場合があります。 ◎トラッシュ 捨て札置き場や、捨て札置き場にカードを移動させることを指します。 トラッシュされたカードは基本的に使う事ができません。バトルで敗北したカードなどがここに置かれます。 全て表向きに置かれるので、相手のトラッシュや自分のトラッシュの情報は常に見ることができます。 ◎ターン スタンバイからエンドまでの流れをターンと呼びます。 この一連の流れ1つで1ターンです。 ◎バトル フィールドバトル時の相手カードと自分カードの戦闘を指します。 基本的に属性で優劣か、パワーの優劣でバトルの決着がつきます。 A、B、C、D、Eの5つのフィールドスペースがあるので、相手と自分のカードは1ターンにつき必ず5回バトルを行う事になります。 カードの効果などによって、そのターン中のバトルが行われなくなる場合があります。 バトルはAから順番に1つずつ処理していきます。 ◎イニシアチブ 効果の発動などの優先権です。 フィールドオープン時やバトル時にカードの特殊効果が発動する場合、イニシアチブのあるプレイヤーのカードから効果を処理していきます。 ゲームスタート時はランダムにどちらかのプレイヤーに置かれますが、イニシアチブはターン毎に入れ替わります。 ◎属性 属性カードには水→火→金→木→土の5つの属性と、陽属性←→陰属性、無属性を合わせた8つの属性のうちどれか1つを持っています。 それぞれ矢印の方向に有利な関係があり、1つの属性に対しては強く、また1つの属性に対しては弱いです。 陽属性と陰属性がバトルした場合、相討ちとなり両方とも敗北となります。無属性には得意属性も苦手属性もありません。 バトルにおいて、得意な属性に対しては一方的に勝てますが、苦手な属性に対しては一方的に敗北します。 ただし、パワーの書かれていないカードについては、たとえ属性で勝っていても勝利することはできず、必ず敗北します。 ◎パワー カードの攻撃翌力の高さです。この値が強ければパワーでの戦闘で有利になります。 バトルの際、属性で有利や不利が発生していない場合はパワーの大きさで勝負が決まります。 同じ数字が相手の場合は同士討ちとなり、カードは両者とも負けになります。 パワーの書かれていないカードは相手のカードのパワーが0であっても必ず敗北します。 ◎リスク 敗北しカードがトラッシュに置かれた時、そのプレイヤーはトラッシュされたカードのリスクの同じ数値分のダメージを受けます。 リスクの数値が高いカードは敗北した時のダメージが大きいためにまさにリスクが高いですが、その分カードの性能は高い場合が多いです。 ◎ダメージ ライフの減少です。この値が大きいほどライフが大きく減少します。 カードが敗北した時にプレイヤーはそのカードにあるリスク分の敗北ダメージを負います。 バトルによる敗北ダメージを積み重ね、HPが0になるとゲームに負けてしまいます。 ◎ガードポイント カードの打たれ強さ、敗北してもトラッシュされない回数を指します。 バトルでカードが敗北しトラッシュされる際、ガードポイントの数値が1以上残っていれば、この値を1減少させて場に留まります。 敗北してもカードが場に留まっている場合は、プレイヤーはリスクによるダメージを受けません。 ◎勝利回数 バトルに勝利しフィールドに留まったカードには勝利回数が1与えられます。 勝利回数が5になったカードはフィールドバトル終了時に、強制的にトラッシュに置かれてしまいます。 ただし敗北によりトラッシュされたわけではないので、プレイヤーは敗北ダメージを受けません。 ※特殊効果はベータ版において実装されません.あしからず. 【完成版実装予定の仕様】 上位属性 種族 他のパラメータの導入 特殊効果 【その他】 名前の由来 "環状を描く"の意.発案者曰く,属性の相性の相関性が環状になっていること,描くと引くとがマッチしているように感じたからとのこと.